package com.j4dream.property.javabasic.designpattern.factory_abstract;

import com.j4dream.property.javabasic.designpattern.factory.Shape;

public class ColorFactory extends AbstractFactory {

    @Override
    public Color getColor(String color) {
        if ("red".equalsIgnoreCase(color)) {
            return new Red();
        } else if ("blue".equalsIgnoreCase(color)) {
            return new Blue();
        } else if ("green".equalsIgnoreCase(color)){
            return new Green();
        }
        return null;
    }

    @Override
    public Shape getShape(String shape) {
        return null;
    }
}
